From 1434937088f68ce24eb4b3008108019243d3a2bc Mon Sep 17 00:00:00 2001 From: Ell Date: Sun, 24 Sep 2017 17:46:50 -0400 Subject: [PATCH] babl: in babl_polynomial_approximate_gamma(), verify that x0 >= 0 Now that the previous commit (hopefully) makes us iPhone-proof, we can add an assertion for this condition. If we want to replace the assertions with some sort of bailing, we'll need to replace the rest of them too anyway. --- babl/babl-polynomial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/babl/babl-polynomial.c b/babl/babl-polynomial.c index c9f195b..82f9ce4 100644 --- a/babl/babl-polynomial.c +++ b/babl/babl-polynomial.c @@ -516,6 +516,7 @@ babl_polynomial_approximate_gamma (BablPolynomial *poly, babl_assert (poly != NULL); babl_assert (gamma >= 0.0); + babl_assert (x0 >= 0.0); babl_assert (x0 < x1); babl_assert (degree >= BABL_POLYNOMIAL_MIN_DEGREE && degree <= BABL_POLYNOMIAL_MAX_DEGREE); -- 2.30.2